<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="Generator" content="ECSHOP v2.7.3" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title><?php echo $this->_var['page_title']; ?></title>
<meta name="Keywords" content="<?php echo $this->_var['keywords']; ?>" />
<meta name="Description" content="<?php echo $this->_var['description']; ?>" />

<link href="themes/yesmywine/css/comment.css" rel="stylesheet" type="text/css" />
<link href="themes/yesmywine/css/comment2.css" rel="stylesheet" type="text/css" />
<link href="themes/yesmywine/css/header.css" rel="stylesheet" type="text/css" />
<link href="themes/yesmywine/css/product.css" rel="stylesheet" type="text/css" />
<link href="themes/yesmywine/css/jqzoom.css" rel="stylesheet" type="text/css" />
<link href="themes/yesmywine/css/productlist.css" rel="stylesheet" type="text/css" />
<link href="themes/yesmywine/css/jquery.boxy.css" rel="stylesheet" type="text/css" />


<script type="text/javascript" src="themes/yesmywine/js/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="themes/yesmywine/js/ym.js"></script>
<script type="text/javascript" src="themes/yesmywine/js/ym.ui.js"></script>



<script type="text/javascript" src="themes/yesmywine/js/header_full.js"></script>
<script type="text/javascript" src="themes/yesmywine/js/cart_api.js"></script>


<script type="text/javascript" src="themes/yesmywine/js/transport.js"></script>
<script type="text/javascript" src="themes/yesmywine/js/common2.js"></script>
<?php echo $this->smarty_insert_scripts(array('files'=>'utils.js')); ?>

</head>

<body>

<?php echo $this->fetch('library/page_header.lbi'); ?>

<?php
$GLOBALS['smarty']->assign('goods',get_goods_info2($GLOBALS['smarty']->_var['goods']['goods_id']));
?> 

	<div class="content">

		<div class="crumb"><?php echo $this->_var['ur_here']; ?></div>

         <div class="promotion clearfix">

            <div class="content">

            <div class="promotionPic">

	            <div id="catalog" class="catalog">

	                <a href="javascript:void(0)" class="aUp" title="向上"></a>

	                <div class="imgbox1">

	                    <ul id="image_list" class="imgbox">
<?php $_from = $this->_var['pictures']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'picture');$this->_foreach['picture'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['picture']['total'] > 0):
    foreach ($_from AS $this->_var['picture']):
        $this->_foreach['picture']['iteration']++;
?>
	                    	<li><img src="<?php echo $this->_var['picture']['thumb_url']; ?>" alt="<?php echo $this->_var['picture']['img_url']; ?>" longdesc="<?php echo $this->_var['picture']['img_url']; ?>" /></li>
<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>

	                    </ul>

	                </div>

	                <a href="javascript:void(0)" class="aDown" title="向下"></a>

	            </div>

	            <div id="pro_infor">

	                <div id="image_box">

		                <a href="<?php if ($this->_var['pictures']): ?><?php echo $this->_var['pictures']['0']['img_url']; ?><?php else: ?><?php echo $this->_var['goods']['goods_img']; ?><?php endif; ?>" class="jqzoom" title="">
<?php if ($this->_var['goods']['promote_price'] != ""): ?>
				                <i> 
									<ins class='zhe'>折</ins>
								</i>
<?php endif; ?>

								<img src="<?php if ($this->_var['pictures']): ?><?php echo $this->_var['pictures']['0']['img_url']; ?><?php else: ?><?php echo $this->_var['goods']['goods_img']; ?><?php endif; ?>"  alt="" width="220" height="360" id="current_img"/>

			                </a>

		                </div>

	            </div>

	

	        </div>

	        <input type="hidden" id="priceShowType" value="1"/>

	        <div id='hkAreaId' hkAreaId=""></div>

<div class="promotionMiddle">

         <div class="promotionMiddleTop" style=" padding-bottom:10px;">

             <h1><?php echo $this->_var['goods']['goods_name']; ?></h1>

             <span><?php echo $this->_var['goods']['goods_brief']; ?></span>

             <ul>

             	<li><?php if ($this->_var['goods']['promote_price'] != ""): ?>促销价<?php else: ?>本店价<?php endif; ?>：<b class=rmbPrice ><?php if ($this->_var['goods']['promote_price'] != ""): ?><?php echo $this->_var['goods']['promote_price']; ?><?php else: ?><?php echo $this->_var['goods']['shop_price_formated']; ?><?php endif; ?></b></li>

	            <li>

	               	 		市场价：<ins class=rmbPrice ><?php echo $this->_var['goods']['market_price']; ?></ins>
			               &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			               &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;节省：<span class=rmbPrice ><?php echo $this->_var['goods']['save_price']; ?></span></li>


             </ul>

         </div>

<?php
$GLOBALS['smarty']->assign('favourable_list', favourable_list2());
?>
<?php if ($this->_var['favourable_list']): ?>
<div class="promotionMiddleAct" style=" margin-top:10px;">
<?php $_from = $this->_var['favourable_list']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'favourable');if (count($_from)):
    foreach ($_from AS $this->_var['favourable']):
?>
· <?php echo $this->_var['favourable']['act_name']; ?><br>
<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>  
</div>
<?php endif; ?>

<form action="javascript:addToCart(<?php echo $this->_var['goods']['goods_id']; ?>)" method="post" name="ECS_FORMBUY" id="ECS_FORMBUY" >
         <div class="promotionMiddleKey" id="proChange1" style=" margin-top:15px;">

	              <div class="promotionMiddleKeyN" id="proChange2" onmouseover="GoodsDetail.changeBackgroundColor();" onmouseout="GoodsDetail.removeBackgroundColor();">

	                  <ul>

                          <li>

	                      	<span id="choosed-area-selector">商品总价：</span><ins id="ECS_GOODS_AMOUNT" style="font-size:16px">&nbsp;</ins>

	                      	</li>

	                      <li id="years-list" style="display:none"></li>

	                      <li id="online-getWineNum">

	                      	<span>选择数量：</span>

	                      	<a class="left" onclick="GoodsDetail.changeGoodsAmount('sub', 'winenum');changePrice();"></a>

	                      		<input id="winenum" name="number" type="text" onblur="if (value=='') {value='1'};GoodsDetail.changeGoodsAmount('chg','winenum');" value="1" onfocus="if(value=='1') {value=''}" size="4" maxlength="5" />

	                      	<a class="right" onclick="GoodsDetail.changeGoodsAmount('add', 'winenum');changePrice();"></a>

	                      </li>

	                      <li>

	                      	

	                      	

	                      	<a href="#" class="buy" onclick="javascript:addToCart(<?php echo $this->_var['goods']['goods_id']; ?>);"></a>

	                    	

	                       	<a href="#" class="sc" onclick="javascript:collect(<?php echo $this->_var['goods']['goods_id']; ?>);"></a>

	                      	</li>

                          </ul>

	              </div>

	       		</div>
</form>
                
<div class="product-share" style=" margin-top:5px;"></div>
                    
    

	<script type="text/javascript" id="bdshare_js" data="type=tools&amp;uid=6430606"></script>

	<script type="text/javascript">

	$(document).ready(function() {

		$('.product-share').css('position', 'relative');

		$('.product-share').append('<div id="bdshare" class="bdshare_t bds_tools_32 get-codes-bdshare" ><span class="bds_more">分享到：</span><a class="bds_qzone"></a><a class="bds_tsina"></a><a class="bds_tqq"></a><a class="bds_renren"></a></div>');

		window.bdShare_config = {"type":"small", "color":"orange", "uid":"6430606"};

		YM.loader.getRemoteScript('http://share.baidu.com/static/js/shell_v2.js?cdnversion='+new Date().getHours(), {id:'bdshell_js'});

	});

	</script>  	

	       		</div>
                
                <div class="mod-comment-summary fr">

		            <p>商品ID:<span><?php echo $this->_var['goods']['goods_sn']; ?></span></p>

                    <p class="comment-sum">

		                <span class="fr">有<?php echo $this->_var['goods']['comment_count']; ?>人评论</span>

		                <span>已售出<strong><?php echo $this->_var['goods']['sell_number']; ?></strong>件</span>

		            </p>

		            <dl class="comment-score clearfix">

		                <dt>综合星级：</dt>

		                <dd><span class="m-ratescore"><i style="width:<?php echo $this->_var['goods']['comment_rank2']; ?>%"><?php echo $this->_var['goods']['comment_rank2']; ?>%</i></span></dd>

		            </dl>

		            <div class="comment-grade">

		              <p>会员评分：<strong><?php echo $this->_var['goods']['comment_rank2']; ?></strong>分</p>

<?php
$comment_count=$GLOBALS['smarty']->_var['goods']['comment_count'];
if($comment_count!=0)
{
$comment_count1=intval($GLOBALS['smarty']->_var['goods']['comment_count1']/$comment_count*100);
$comment_count3=intval($GLOBALS['smarty']->_var['goods']['comment_count3']/$comment_count*100);
$comment_count5=100-$comment_count1-$comment_count3;
}
else
{
$comment_count5=100;
$comment_count3=0;
$comment_count1=0;
}

$GLOBALS['smarty']->assign('comment_count5', $comment_count5);
$GLOBALS['smarty']->assign('comment_count3', $comment_count3);
$GLOBALS['smarty']->assign('comment_count1', $comment_count1);
?>


		              <dl class="m-percent clearfix">

		                    <dt>很好</dt>

		                    <dd class="volumn"><span class="vol-1"><i style="width:<?php echo $this->_var['comment_count5']; ?>%;"></i></span></dd>

		                    <dd><?php echo $this->_var['comment_count5']; ?>%</dd>

		                    <dt>较好</dt>

		                    <dd class="volumn"><span class="vol-2"><i style="width:<?php echo $this->_var['comment_count3']; ?>%;"></i></span></dd>

		                    <dd class=""><?php echo $this->_var['comment_count3']; ?>%</dd>

		                    <dt>一般</dt>

		                    <dd class="volumn"><span class="vol-3"><i style="width:<?php echo $this->_var['comment_count1']; ?>%;"></i></span></dd>

		                    <dd class=""><?php echo $this->_var['comment_count1']; ?>%</dd>

		                </dl>

		            </div>


	</div>

    </div>

	    

<?php if ($this->_var['fittings']): ?>
<form action="post.php" method="post" name="ECS_ALL_addcart" >

	<div class="Combination" id="goods-suggested-combination">

	    	<h3 id="goods-suggested-combination-title">

	            <span>会员经常一起购买的商品</span>
	            <a href="#">礼盒组合</a>
	            </h3>

	        <ul>

		       	 	<li class="img"><img src="<?php echo $this->_var['goods']['goods_thumb']; ?>"/></li>
 <input name="goods_id[]" type="hidden" id="goods_id_<?php echo $this->_var['goods']['goods_id']; ?>" value="<?php echo $this->_var['goods']['goods_id']; ?>" > 

		        	<li class="middle">

<?php $_from = $this->_var['fittings']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'goods_0_07175300_1502618064');$this->_foreach['goods'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['goods']['total'] > 0):
    foreach ($_from AS $this->_var['goods_0_07175300_1502618064']):
        $this->_foreach['goods']['iteration']++;
?>
			        	<ol>

				            	<a href="<?php echo $this->_var['goods_0_07175300_1502618064']['url']; ?>"><img src="<?php echo $this->_var['goods_0_07175300_1502618064']['goods_thumb']; ?>"/></a>

				                <dl id="wine-box-dt">

				                	<dt><a href="<?php echo $this->_var['goods_0_07175300_1502618064']['url']; ?>"><?php echo htmlspecialchars($this->_var['goods_0_07175300_1502618064']['short_name']); ?></a></dt>

				                    <dd>

				                    		促销价: <b class=rmbPrice ><?php echo $this->_var['goods_0_07175300_1502618064']['fittings_price']; ?></b><br />

				                    	</dd>

				                    <dd><input <?php if (($this->_foreach['goods']['iteration'] <= 1)): ?>checked="true"<?php endif; ?> type="checkbox" value="<?php echo $this->_var['goods_0_07175300_1502618064']['goods_id']; ?>" class="wine-box-checkbox" price2="<?php echo $this->_var['goods_0_07175300_1502618064']['shop_price']; ?>" price3="<?php echo $this->_var['goods_0_07175300_1502618064']['fittings_price']; ?>" onclick="GoodsDetail.calculateBoxesPrice2();" name="goods_id[]" id="goods_id_<?php echo $this->_var['goods_0_07175300_1502618064']['goods_id']; ?>"/></dd>

				                </dl>

				        </ol>
                        
<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>

			        	</li>

		            <li class="last">

		            	<p>
		           		<input type="hidden" id="dev_suit_base_price1" value="<?php if ($this->_var['goods']['promote_price'] != ""): ?><?php echo $this->_var['goods']['promote_price']; ?><?php else: ?><?php echo $this->_var['goods']['shop_price_formated']; ?><?php endif; ?>"/>
                        <input type="hidden" id="dev_suit_base_price2" value="<?php echo $this->_var['goods']['market_price']; ?>"/>

		                	组合价：<b id=box-suit-price class=rmbPrice ><?php if ($this->_var['goods']['promote_price'] != ""): ?><?php echo $this->_var['goods']['promote_price']; ?><?php else: ?><?php echo $this->_var['goods']['shop_price_formated']; ?><?php endif; ?></b><br />
		                	节&nbsp;&nbsp;&nbsp;省：<span id=box-save-price class=rmbPrice >0.0</span><br />

		                </p>
                       
                        <input name="" type="submit" class="bnt_blue_6" value="添加到购物车"/>

		            </li>

		       	</ul>

	       	</div>

<div class="clear"></div>

<input name="action"  value="all_addcart" type="hidden" />
</form>
<?php endif; ?>


	</div>

	    

	    <div class="proDetails">
<a name="xiangqingTop"></a>
	      <h3><a class="hover">商品详情</a><a href="#productComment">用户评价</a><a href="#zixunTop">商品咨询</a></h3>

		  <div class="clear"></div>
<?php $_from = $this->_var['properties']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('key', 'property_group');if (count($_from)):
    foreach ($_from AS $this->_var['key'] => $this->_var['property_group']):
?>
		  <div class="xiangqing">

		      	<ul>
<?php $_from = $this->_var['property_group']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'property');if (count($_from)):
    foreach ($_from AS $this->_var['property']):
?>
		      		<li><span title="<?php echo $this->_var['property']['value']; ?>"><b><?php echo htmlspecialchars($this->_var['property']['name']); ?></b><?php echo $this->_var['property']['value']; ?></span></li>
<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>

		        </ul>

	   		  </div>
<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>

   		  <div class="proContent">
<?php echo $this->_var['goods']['goods_desc']; ?>
		  </div>

          
          </div>

	    
        
<?php echo $this->fetch('library/comments.lbi'); ?>

<?php echo $this->fetch('library/comments1.lbi'); ?>


	</div>

	
    

<?php echo $this->fetch('library/page_footer.lbi'); ?>

<script type="text/javascript" src="themes/yesmywine/js/jquery.jqzoom.pack.1.0.1.js"></script>
<script type="text/javascript" src="themes/yesmywine/js/scrolltopc.js"></script>
<script type="text/javascript" src="themes/yesmywine/js/goods.detail.js"></script>

</body>

<script type="text/javascript">
var goods_id = <?php echo $this->_var['goods_id']; ?>;
var goodsattr_style = <?php echo empty($this->_var['cfg']['goodsattr_style']) ? '1' : $this->_var['cfg']['goodsattr_style']; ?>;
var gmt_end_time = <?php echo empty($this->_var['promote_end_time']) ? '0' : $this->_var['promote_end_time']; ?>;
<?php $_from = $this->_var['lang']['goods_js']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('key', 'item');if (count($_from)):
    foreach ($_from AS $this->_var['key'] => $this->_var['item']):
?>
var <?php echo $this->_var['key']; ?> = "<?php echo $this->_var['item']; ?>";
<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
var goodsId = <?php echo $this->_var['goods_id']; ?>;
var now_time = <?php echo $this->_var['now_time']; ?>;


onload = function(){
  changePrice();
  //fixpng();
  try {onload_leftTime();}
  catch (e) {}
}

/**
 * 点选可选属性或改变数量时修改商品价格的函数
 */
function changePrice()
{
  var attr = getSelectedAttributes(document.forms['ECS_FORMBUY']);
  var qty = document.forms['ECS_FORMBUY'].elements['number'].value;

  Ajax.call('goods.php', 'act=price&id=' + goodsId + '&attr=' + attr + '&number=' + qty, changePriceResponse, 'GET', 'JSON');
}

/**
 * 接收返回的信息
 */
function changePriceResponse(res)
{
  if (res.err_msg.length > 0)
  {
    alert(res.err_msg);
  }
  else
  {
    document.forms['ECS_FORMBUY'].elements['number'].value = res.qty;

    if (document.getElementById('ECS_GOODS_AMOUNT'))
      document.getElementById('ECS_GOODS_AMOUNT').innerHTML = res.result;
  }
}

</script>

</html>

